<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        个人信息
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="css/main.css" media="all">
    <link rel="stylesheet" href="css/bootstrap.css">
    <script type="text/javascript" src="lib/loading/okLoading.js"></script>
    <!-- 引入ElementUI样式 -->
    <link rel="stylesheet" href="/css/index.css">
</head>
<body>
<div class="x-body">
    <xblock>
        <button class="layui-btn" onclick="user_password('修改密码','user_password.html','1000','600')">
            <i class="layui-icon">&#xe608;</i>修改密码
        </button>
    </xblock>
</div>
<div id="app">
    <div class="x-body" >
        <div style="width:950px ">
            <el-form :model="user" :rules="rules" ref="repairFormRef" label-width="120px" class="demo-ruleForm">

                <el-form-item label="所属社区" prop="communityName">
                    <el-input v-model="user.communityName" :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="所属楼栋" prop="buildingName">
                    <el-input v-model="user.buildingName" :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="业主姓名" prop="name">
                    <el-input v-model="user.name" :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="登录密码" prop="password">
                    <el-input v-model="user.password" :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="身份证号" prop="idcard">
                    <el-input v-model="user.idcard" :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="联系方式" prop="telephone">
                    <el-input v-model="user.telephone" :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="性别" prop="sex">
                    <el-tag type="warning" v-model="user.sex">
                        {{user.sex}}
                    </el-tag>
                </el-form-item>

                <el-form-item label="业主类型" prop="type">
                    <el-tag type="success"  v-model="user.type">
                        {{user.type}}
                    </el-tag>
                </el-form-item>

                <el-form-item label="入住时间" prop="createTime">
                    <el-input v-model="user.createTime" :disabled="true"></el-input>
                </el-form-item>

            </el-form>
        </div>

    </div>
</div>
<script src="lib/layui/layui.js" charset="utf-8"></script>
<script src="js/vue-router.js"></script>
<script src="/js/vue.js" charset="utf-8"></script>
<!-- 引入Element组件库 -->
<script src="/js/index.js"></script>
<script src="/js/axios.js" charset="utf-8"></script>
<script src="js/x-layui.js" charset="utf-8"></script>

<script>

        layui.use(['laydate','element','laypage','layer'], function(){
        $ = layui.jquery;//jquery
        laydate = layui.laydate;//日期插件
        lement = layui.element();//面包导航
        laypage = layui.laypage;//分页
        layer = layui.layer;//弹出层
        okLoading.close($)
        //以上模块根据需要引入

        });

<!--        var router = new VueRouter({-->
<!--        routes:[-->
<!--        {path:'/',redirect:'/userlogin.thml'},-->
<!--        ]-->
<!--        })-->
    /*添加弹框*/
    function user_password(title,url,w,h){
        x_admin_show(title,url,w,250);
    }

        var app = new Vue({
        el:"#app",//声明当前Vue在页面的作用域
        data:{
        user:{},
        },
        created(){
        axios.post("user/userInfo/").then((res)=>{

        if(res.data.code==2001){
<!--        this.$router.push({path: "/"});-->
            alert("会话超时，请重新登录！");
            parent.location.href = "/user_login.html";
        }else{
        app.user = res.data.data;
        }

        });
},
<!--        router-->
        });

    </script>
</body>
</html>